/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Review.test2;

import java.util.Random;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author THIEN
 */
public class Data {

    int random;
    boolean flag = false;

    public void generateNum() {
        Random randObj = new Random();
        int rand = randObj.nextInt(10);
        this.random = rand;
        try {
            Thread.sleep(500);
        } catch (InterruptedException ex) {
            Logger.getLogger(Data.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void displayNum() {
        System.out.println(random + 1);
    }
}
